# -*- coding:utf-8 -*- #

import os


#引入上层目录模块方法
import sys
sys.path.append("..")
from priority import rootHomeDir

DEBUG = True
#获取当前文件的路径
#ROOT = os.path.dirname(os.path.abspath(__file__))
#获取当前文件的路径
#ROOT = os.path.dirname(os.path.realpath(__file__))

ROOT = rootHomeDir()

logger_position = os.path.join(ROOT, 'log','record.bak')
logger_path = os.path.join(ROOT, 'log','ex_logger')
alarm_backup_path = os.path.join(ROOT, 'log','alarm_backup')

remote_server = 'localhost'

alarmcfg = (('core.network.ShortConnection', (remote_server, 2000)), 
            #('memory',
             #'monitorprobes.memory.get_memory_info', 
             #(1, (10, 10, 10, 10)), 
             #{'id': 240}, 
             #{'WarningData': 10}),
            #('disk_wr_able', 
             #'monitorprobes.disk_wr.disk_wr_able', 
             #(1, (10, 30, 60, 90)), 
             #{'id': 221}), 
            ('disk_space', 
             'monitorprobes.disk_space.get_disk_space', 
             (10, (10, 10, 10, 10)), 
             {'id': 201}, 
             {'WarningData': 80})
            )
monitorcfg = (('core.network.ShortConnection', (remote_server, 2000)), 
              ('memory', 
               'monitorprobes.memory.get_memory_info', 
               (1, (10, 10, 10, 10)), 
               {'id': 180}, 
               {'WarningData': 10}), 
              #('webpagevisit', 
               #'monitorprobes.web.webpage_visit', 
               #(10, (120, 300, 600, 900)), 
               #{'id': 160}, 
               #{'list': ['8080/bl.html', '8081/smgs/bl.html']}), 
              #('flow', 
               #'monitorprobes.flow.get_flow_info', 
               #(1, (30, 60, 120, 180)), 
               #{'id': 140}, 
               #{'network': 'eth0', 'WarningData': 80}), 
              #('cpu_state',
               #'monitorprobes.cpu.get_cpu_info', 
               #(1, (30, 60, 120, 180)), 
               #{'id': 99}, {'WarningData': 70}), 
              ('disk_space', 
               'monitorprobes.disk_space.get_disk_space', 
               (1, (30, 60, 120, 180)), 
               {'id': 21}, 
               {'WarningData': 10})
              )

cmdconfig = {'alarmcfg' : alarmcfg, 'monitorcfg' : monitorcfg, }
#cmdconfig = {'alarmcfg' : alarmcfg, }